--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 9bbdd97836ae5b018095162696d652c0b0cde2c5
Parents : fc58fe9
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-07-25T16:14:50+02:00
Added ability to start HDX calls in loudspeaker mode
Changes
2 files changed, 23 insertions(+), 1 deletions(-)
Diff
diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index 8d9817f5..6268e157 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -841,6 +841,7 @@ class SidebandCore():
if not "voice_ringer" in self.config: self.config["voice_ringer"] = None
if not "voice_loudspeaker" in self.config: self.config["voice_loudspeaker"] = None
if not "voice_trusted_only" in self.config: self.config["voice_trusted_only"] = False
+ if not "voice_hdx_loudspeaker" in self.config: self.config["voice_hdx_loudspeaker"] = True
if not "voice_low_latency" in self.config: self.config["voice_low_latency"] = False
# Make sure we have a database
diff --git a/sbapp/ui/voice.py b/sbapp/ui/voice.py
index 6f0f11ea..a394e61b 100644
--- a/sbapp/ui/voice.py
+++ b/sbapp/ui/voice.py
@@ -394,6 +394,8 @@ class Voice():
if not RNS.Transport.has_path(destination_hash): self.request_path(destination_hash)
else:
RNS.log(f"Calling {RNS.prettyhexrep(self.dial_target)}...", RNS.LOG_DEBUG)
+ if self.call_mode == Profiles.MODE_HALF_DUPLEX and self.app.sideband.config["voice_hdx_loudspeaker"]:
+ self.app.sideband.telephone.enable_loudspeaker(True)
if self.app.sideband.telephone.dial(self.dial_target, profile=self.call_profile, mode=self.call_mode) == "no_path":
self.request_path(destination_hash)
self.update_call_status()
@@ -405,6 +407,8 @@ class Voice():
elif self.app.sideband.telephone.is_ringing:
RNS.log(f"Answering", RNS.LOG_DEBUG)
+ if self.call_mode == Profiles.MODE_HALF_DUPLEX and self.app.sideband.config["voice_hdx_loudspeaker"]:
+ self.app.sideband.telephone.enable_loudspeaker(True)
self.app.sideband.telephone.answer()
self.update_call_status()
@@ -417,7 +421,6 @@ class Voice():
self.update_call_status()
def spk_mute_action(self, sender=None):
- RNS.log(f"SPK ACTION")
if self.app.sideband.voice_running:
if self.app.sideband.telephone.receive_muted:
self.app.sideband.telephone.enable_loudspeaker(False)
@@ -464,6 +467,8 @@ class Voice():
def update_settings_screen(self, sender=None):
self.voice_settings_screen.ids.voice_trusted_only.active = self.app.sideband.config["voice_trusted_only"]
self.voice_settings_screen.ids.voice_trusted_only.bind(active=self.settings_save_action)
+ self.voice_settings_screen.ids.voice_hdx_loudspeaker.active = self.app.sideband.config["voice_hdx_loudspeaker"]
+ self.voice_settings_screen.ids.voice_hdx_loudspeaker.bind(active=self.settings_save_action)
self.voice_settings_screen.ids.voice_low_latency.active = self.app.sideband.config["voice_low_latency"]
self.voice_settings_screen.ids.voice_low_latency.bind(active=self.settings_save_action)
@@ -550,6 +555,7 @@ class Voice():
def settings_save_action(self, sender=None, event=None):
self.app.sideband.config["voice_trusted_only"] = self.voice_settings_screen.ids.voice_trusted_only.active
+ self.app.sideband.config["voice_hdx_loudspeaker"] = self.voice_settings_screen.ids.voice_hdx_loudspeaker.active
self.app.sideband.config["voice_low_latency"] = self.voice_settings_screen.ids.voice_low_latency.active
self.app.sideband.save_configuration()
if self.app.sideband.telephone:
@@ -987,6 +993,21 @@ MDScreen:
size_hint_y: None
height: dp(48)
+ MDLabel:
+ text: "Start HDX calls on loudspeaker"
+ font_style: "H6"
+
+ MDSwitch:
+ id: voice_hdx_loudspeaker
+ pos_hint: {"center_y": 0.3}
+ active: False
+
+ MDBoxLayout:
+ orientation: "horizontal"
+ padding: [0,0,dp(24),0]
+ size_hint_y: None
+ height: dp(48)
+
MDLabel:
text: "Low-latency output"
font_style: "H6"
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────